package com.example.yaja.yaja.service;

import com.example.yaja.yaja.dao.HotelMapper;
import com.example.yaja.yaja.entity.Hotel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Zero on 2017/12/5.
 */
@Service("hotelService")
public class HotelServiceImpl implements HotelService {

    @Autowired
    HotelMapper hotelMapper;

    @Override
    public List<Hotel> findHotelByState(Integer homeState, Integer number) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("homeState", homeState);
        params.put("number", number);
        return hotelMapper.selectHotelByState(params);
    }
}
